#include<conio.h>
#include<stdio.h>
void dodai(int n)
{
	int d=0;
	start:
		printf("%d ",n);
		if (n==1)
		{
			d++;
			goto thoat;
		}
		if (n%2==0)
		{
			n=n/2;
			d++;
		}
		else 
		{
			n=3*n+1;
			d++;
		}
		goto start;
		thoat :
			printf("\nthe circle length of %d is %d",n,d);
}
main()
{
	dodai(22);
	getch();
}
